package com.bw.controller;

import com.bw.entity.*;
import org.spring.kun.common.TokenUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

@Controller
public class ListController {


    @RequestMapping("/list.do")
    public String list(HttpServletRequest request,Model model){


        User userFromRequest = TokenUtils.getLoginUserFromRequest(request, User.class);

        model.addAttribute("nickName",userFromRequest.getNickName());
        model.addAttribute("avatarUrl",userFromRequest.getAvatarUrl());

        return "list";
    }


}
